The inspiration behind this meme is from the Stage 1 Statistics papers I took last year- one of the key concepts that were hammered into our brains in STATS100 and STATS101 was that the magic number for claiming statistical significance is 0.05!
P-value meme
library(magick)
# read the meme images from the internet.
spongebob1 <- image_read("https://b.thumbs.redditmedia.com/tMz9Zx86I3iLM0N-nzQNxk8_1WC7tcGwHjkMVPxZRQY.png") %>%
image_scale(300) %>%
image_modulate(brightness = 80, saturation = 40, hue = 90) %>%
image_annotate("i'm not significant...", size = 15, gravity = "north", color = "#ffffff", font = "impact")
spongebob2 <- image_read("https://imgix.ranker.com/user_node_img/50024/1000474921/original/we-all-know-what-he-s-thinking-photo-u1?auto=format&q=60&fit=crop&fm=pjpg&dpr=2&w=375") %>%
image_scale(300) %>%
image_modulate(brightness = 100, saturation = 400, hue = 90) %>%
image_annotate("I MATTER!", size = 50, gravity = "north", color = "#ffffff", font = "impact") %>%
image_oilpaint()
# created two green squares and used piping to annotate them with the text for the meme.
# also indented the functions that I piped into as well as the arguments for image_blank and image_annotate.
p_value_0.05 <- image_blank(width = 300,
height = 300,
color = "#E1EDDA") %>%
image_annotate(text = "p-value = 0.050000000000001",
color = "#000000",
size = 15,
font = "mono",
gravity = "center")
p_value_0.049 <- image_blank(width = 300,
height = 300,
color = "#E1EDDA") %>%
image_annotate(text = "p-value = 0.0499999999999999",
color = "#000000",
size = 15,
font = "mono",
gravity = "center")
# created vectors for each pair of photo/square with text, appended them together.
first_row <- image_append(c(spongebob1, p_value_0.05))
second_row <- image_append(c(spongebob2, p_value_0.049))
# used stack to append the two appended images together vertically.
meme <- c(first_row, second_row) %>%
image_append(stack = TRUE)
# saving the meme as an image file
image_write(meme, "my_meme.png")
After one of the lectures in STATS220 this week, I was inspired to create this animated GIF emphasising how hard it is to gain meaningful insights from data before it has been cleaned/wrangled.
Trash data GIF
library(magick)
# reading all the required images
trash <- image_read("https://experiencelife.lifetime.life/wp-content/uploads/2021/02/Talking-Trash.jpg") %>%
image_scale(500)
pepe0 <- image_read("Pepe0.webp") %>%
image_scale(200)
pepe1 <- image_read("Pepe1.png") %>%
image_scale(200)
pepe2 <- image_read("Pepe2.jpeg") %>%
image_scale(200)
pepe3 <- image_read("Pepe3.png") %>%
image_scale(200)
# allocating each image to a frame and adding annotations on the images
frame1 <- pepe0 %>%
image_annotate(text = "when you", size = 20, gravity = "north", color = "black") %>%
image_scale(300) %>%
image_extent("300x300")
frame2 <- pepe1 %>%
image_annotate(text = "send out", size = 20, gravity = "north", color = "black") %>%
image_scale(300) %>%
image_extent("300x300")
frame3 <- pepe2 %>%
image_annotate(text = "a badly", size = 20, gravity = "north", color = "black") %>%
image_scale(300) %>%
image_extent("300x300")
frame4 <- pepe3 %>%
image_annotate(text = "designed survey", size = 14, gravity = "center", color = "black") %>%
image_scale(300) %>%
image_extent("300x300")
frame5 <- trash %>%
image_scale(300) %>%
image_extent("300x300")
# putting the frames in order using a vector
frames <- c(frame1, frame2, frame3, frame4, frame5)
# creating an animation
animation <- image_morph(frames) %>%
image_animate(fps = 4)
# saving the GIF to computer
image_write(animation, "my_animation.gif")
@import url('https://fonts.googleapis.com/css2?family=Shantell+Sans&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Rampart+One&display=swap');
body {
font-family: 'Shantell Sans';
background-color: #E1DCF3;
margin: 60px;
}
p {
font-weight: bold;
color: #746B93;
padding: 15px;
}
h1, h2 {
font-family: 'Rampart One';
color: #414E6C;
}